package usecasecontrol;

import java.awt.Component;
import java.awt.Window;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.io.IOException;
import java.util.List;
import java.util.logging.Logger;

import javax.swing.JInternalFrame;
import javax.swing.JOptionPane;
import javax.swing.JTable;

import presentation.control.Callback;
import presentation.control.LoginUIControl;
import presentation.gui.CartItemsWindow;
import presentation.gui.CustomTableModel;
import presentation.gui.DefaultData;
import presentation.gui.EbazaarMainFrame;
import presentation.gui.FinalOrderWindow;
import presentation.gui.PaymentWindow;
import presentation.gui.ShipAddressesWindow;
import presentation.gui.ShippingBillingWindow;
import presentation.gui.TermsWindow;

import middleware.exceptions.DatabaseException;
import business.SessionCache;
import business.customersubsystem.CustomerSubsystemFacade;
import business.exceptions.BackendException;
import business.exceptions.BusinessException;
import business.exceptions.ParseException;
import business.exceptions.RuleException;
import business.externalinterfaces.CustomerConstants;
import business.externalinterfaces.Address;
import business.externalinterfaces.CreditCard;
import business.externalinterfaces.CustomerProfile;
import business.externalinterfaces.CustomerSubsystem;
import business.externalinterfaces.ShoppingCartSubsystem;
import business.shoppingcartsubsystem.ShoppingCartSubsystemFacade;
import business.util.CustomerUtil;
import business.util.ShoppingCartUtil;
import business.util.StringParse;

public class CheckoutController  {
	private static final Logger LOG = Logger.getLogger(CheckoutController.class
			.getPackage().getName());
	
	
	public void runShoppingCartRules() throws RuleException, BusinessException {
		ShoppingCartSubsystem shopCartSs = ShoppingCartSubsystemFacade.getInstance();
		shopCartSs.runShoppingCartRules();		
	}
	
	public void runPaymentRules(Address addr, CreditCard cc) throws RuleException, BusinessException {
		
	}
	
	
	
	public void runFinalOrderRules(ShoppingCartSubsystem scss) throws RuleException, BusinessException {
		
	}
	
	public void verifyCreditCart() throws BusinessException {
		CustomerSubsystem cust = 
			(CustomerSubsystem)SessionCache.getInstance().get(CustomerConstants.CUSTOMER);
		cust.checkCreditCard();
	}
	
	public void submitFinalOrder() throws BackendException {
		
	}

	
	public CheckoutController() {
	}

}
